﻿using System.Windows.Forms;

namespace PagedDataGridView
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            pagedDataGridViewTest.Draw();
            pagedDataGridViewTest.ReziseControl(350, 800);
            var filter = new TextBoxFilter("Quantity", textBox1);
            pagedDataGridViewTest.AddFilter(filter);

            var cbFilter = new ComboBoxFilter("ProductID", comboBox1, "Select ProductID FROM [dbo].[Order Details]");

            pagedDataGridViewTest.AddFilter(cbFilter);
        }

        private void buttonFilter_Click(object sender, System.EventArgs e)
        {
            pagedDataGridViewTest.ApplyFilters();
        }
    }
}
